package homework;

public class Day03Homework1 {
    public static void main(String[] args) {
        /*
        //1)
        System.out.println(5%2);
        System.out.println(8%2);
        System.out.println(2%8);

        int a=5,b=5;
        a++;
        ++b;
        System.out.println(a);
        System.out.println(a);

        int aa=5,bb=5;
        int cc = aa++;
        int dd = ++bb;
        System.out.println(aa);
        System.out.println(bb);
        System.out.println(cc);
        System.out.println(dd);

        int a1=5,b1=5;
        int c1=a1--;
        int d1=--b1;
        System.out.println(a1);
        System.out.println(b1);
        System.out.println(c1);
        System.out.println(d1);
        */
        /*
        int a=5,b=10,c=5;
        boolean b1 =b>a;
        System.out.println(b1);
        System.out.println(c<b);
        System.out.println(a>=c);
        System.out.println(b<=a);
        System.out.println(a==c);
        System.out.println(a!=c);

        System.out.println(a+c>10);
        System.out.println(b%2==0);
        System.out.println(c++>5);
        System.out.println(c++>5);
        */
        /*
        int a=5,b=10,c=5;
        boolean b1 = b>=a && b<c;
        System.out.println(b1);
        System.out.println(b<=c && b>a);
        System.out.println(a==b && c>b);
        System.out.println(b!=c && a<b);

        System.out.println(b>=a || b<c);
        System.out.println(b<=c || b>a);
        System.out.println(b!=c || a<b);
        System.out.println(a==b || c>b);

        boolean b2 =!(a<b);
        System.out.println(b2);
        System.out.println(!(a>b));
        */
        int a=5,b=10,c=5;
        boolean b3 = a>b && c++>2;
        System.out.println(b3);
        System.out.println(c);
        boolean b4 = a<b ||c++>2;
        System.out.println(b4);
        System.out.println(c);

        int aa=5;
        aa +=10;
        System.out.println(aa);
        aa*=2;
        System.out.println(aa);
        aa/=6;
        System.out.println(aa);
        short s =5;
        //s= s+10;
        s+=10;

        int age = 38;
        System.out.println("age=");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("今年"+age+"岁");
        String name ="lwg";
        System.out.println("name="+name);
        System.out.println("我叫"+name+"年龄"+age+"岁了");

        System.out.println(10+20+""+30);
        System.out.println(""+10+20+30);
        System.out.println(10+20+30+"");

        int num = 5;
        int flag = num>0?1:-1;
        System.out.println(flag);

        int r =8,t=6;
        int max =r>t?r:t;
        System.out.println("max="+max);

        double price =300.0;
        if(price>=500){
            price *=0.8;
        }
        System.out.println("最后的为"+price);

        int score = 666;
        if(score>=0&&score<=100){
            System.out.println("合格");
        }
        System.out.println("继续");
        double price1 =99.0;
        if(price1>500){
            price1 *=0.8;
        }else{
            price1 *=0.9;
        }
        System.out.println("消费金额:"+price1);
        int score1 =57;
        if(score>=0&&score<=100){
            System.out.println("合法");
        }else{
            System.out.println("不合法");
        }
        double price2 = 40000.0;
        if(price>=2000){
            price2*=0.5;
        }else if(price2>=1000){
            price2*=0.7;
        }else if(price2>=500){
            price2*=0.8;
        }else{
            price2*=0.9;
        }
        System.out.println("最终"+price2);

    }
}
